{extend name="public:layout" /}
{block name="title"}表单字段列表{/block}
{block name="head"}
{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('Form/index')}"> 表单列表</a></li>
                <li> <a href="{:url('index',['form_id'=>$Request.param.form_id])}"> 表单字段列表</a></li>
                <li class="active">添加表单字段</li>
            </ol>
        </div>
        <div class="ibox-content">
            <div class="toolbar">
                <a class="btn btn-primary" href="{:url('add',['form_id'=>$Request.param.form_id])}">
                    <i class="fa fa-plus"></i>&nbsp;添加字段
                </a>
            </div>
                <table class="table table-bordered" id="grid">
                    <tr>
                        <th>字段标题</th>
                        <th>字段名</th>
                        <th>字段类型</th>
                        <th>排序</th>
                        <th width="100">操作</th>
                    </tr>
                    {volist name="fieldList" id="vo"}
                    <tr>
                        <td>{$vo.field_title}</td>
                        <td>{$vo.field_name}</td>
                        <td>{$vo.field_type}</td>
                        <td>{$vo.field_sort}</td>
                        <td>
                            <a href="{:url('edit',['form_id'=>$Request.param.form_id,'field_id'=>$vo['field_id']])}">编辑</a>
                            <a href="javascript:;" onclick="doAction(this);"
                               data-msg="此操作不可逆！<br/>确认删除吗？" data-url="{:url('del')}"
                               data-params="field_id={$vo.field_id}">删除</a>
                        </td>
                    </tr>
                    {/volist}
                </table>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
{/block}
{block name="script"}{/block}